<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="stripes" uri="http://stripes.sourceforge.net/stripes.tld"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
  <head>
    <title>Sanity Check</title>
    <link href="styles.css" rel="stylesheet" type="text/css" />
  </head>
  
  <body>
  Missing organizations:
  <table  id="missingOrganization" class="plainTable">
    <c:forEach var="organization" items="${actionBean.missingOrganization}">
        <tr>
        <td>${organization} in Collaboration ${collaboration.name} is missing.</td>
        <td>
          <stripes:link href="/Organization.action" event="edit" target="main">
            <stripes:param name="name" value="${organization}"/>Add it now
          </stripes:link>
        </td>
        </tr>
    </c:forEach>
  </table>
  Missing researchers:
  <table id="missingResearcher">
    <c:forEach var="researcher" items="${actionBean.missingResearcher}">
        <tr>
        <td>${researcher} in Organization ${organization.name} is missing.</td>
        <td>
          <stripes:link href="/Researcher.action" event="edit" target="new">
            <stripes:param name="name" value="${researcher}"/>Add it now
          </stripes:link>
        </td>
        </tr>
    </c:forEach>
  </table>
  Other violations, click on the name to edit:
  <table id="violations">
    <c:forEach var="entry" items="${actionBean.researcherViolations}">
    	<tr>
        	<td><stripes:link href="/Researcher.action" event="edit" target="new">
            <stripes:param name="name" value="${entry.key}"/>${entry.key}
          </stripes:link></td>
            <td>${entry.value}</td>
        </tr>
    </c:forEach>
    <c:forEach var="entry" items="${actionBean.organizationViolations}">
    	<tr>
        	<td><stripes:link href="/Organization.action" event="edit" target="new">
            <stripes:param name="name" value="${entry.key}"/>${entry.key}
          </stripes:link></td>
            <td>${entry.value}</td>
        </tr>
    </c:forEach>
    <c:forEach var="entry" items="${actionBean.collaborationViolations}">
    	<tr>
        	<td><stripes:link href="/Collaboration.action" event="edit" target="new">
            <stripes:param name="name" value="${entry.key}"/>${entry.key}
          </stripes:link></td>
            <td>${entry.value}</td>
        </tr>
    </c:forEach>
  </table>
  </body>
</html>